﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MLGest.Library
{
    public class ControlNovedad
    {
        string strHTMLNovedades;
        string strHTMLTagUlStart;
        string strHTMLTagUlEnd;
        
        public ControlNovedad()
        {
            strHTMLNovedades = "";
            strHTMLTagUlStart = "<ul width=\"410px\">";
            strHTMLTagUlEnd = "</ul>";
        }

        public void agregarNovedad(string strNovedadDeEjemplo)
        {
            string strHTML = "";
            strHTML += "<li>";
            strHTML += "<div id=\"divUserNews" + System.DateTime.Now.Second.ToString() + System.DateTime.Now.Millisecond.ToString() + "\">";
            strHTML += "<table width=\"380px\" style=\"background-color:#001122; color:White; font-family:Calibri;\">";

            strHTML += "<tr height=300>";
            strHTML += "<td>";
            strHTML += strNovedadDeEjemplo;
            strHTML += "</td>";
            strHTML += "</tr>";
            strHTML += "</table>";
            strHTML += "</div>";
            strHTML += "</li>";

            strHTMLNovedades+=strHTML;
        }

        public string obtenerCartelDeNovedades()
        {
            return strHTMLTagUlStart + strHTMLNovedades + strHTMLTagUlEnd;
        }
    }
}